package community.hospital.annotation;

import community.hospital.validation.IdCardValidation;
import org.springframework.core.annotation.AliasFor;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @Author：ydj
 * @Date：2023/1/16 17:15
 */
@Documented
@Constraint(validatedBy = {IdCardValidation.class})
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface IsIdCard {
    String message() default "身份证号码错误，请重新输入";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };
}
